package com.binance.healthcenter.job;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.binance.healthcenter.monitor.health.HealthMonitorService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;
import com.xxl.job.core.log.XxlJobLogger;

@JobHandler(value = "monitorCadvisorUnHealthJobHandler")
@Component
public class MonitorCadvisorUnHealthJob extends IJobHandler {
    @Autowired
    private HealthMonitorService healthMonitorService;

    @Override
    public ReturnT<String> execute(String param) throws Exception {
        XxlJobLogger.log("================MonitorCadvisorUnHealthJob start");
        healthMonitorService.monitorCAdvisorServiceUnHealthService();
        XxlJobLogger.log("================MonitorCadvisorUnHealthJob  end");
        return SUCCESS;
    }
}
